home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / fdate61a.zip / HOLIDAYS.BAT < prev    next >
DOS Batch File  |  1992-02-15  |  7KB  |  156 lines

  1. @echo off
  2. CLS
  3. goto endcomment
  4. HOLIDAYS.BAT for FDATE version 4.3a
  5. ===================================
  6. If you have any corrections to the algorithms
  7. in this batch file, please send them to Steve Ferg.
  8.  
  9. Revision history:
  10. ===================================
  11. 4.2b Jan 6, 1992
  12.      Corrected algorithm for Advent (thanks to L. Schliesser)
  13. 4.2c Jan 10, 1992
  14.      Added entry for LABOR DAY (1st Monday in Sept) (thanks to L. S.)
  15. 4.3a Jan 12, 1992
  16.      Removed all /Imm-dd-ccyy and /Od1, since those are now the default.
  17. 4.4a Jan 20, 1992
  18.      Added beginning of Black History month to demonstrate new /S
  19.      Added x'FF' in Black History month entry to demonstrate formatting
  20. 6.1a Feb 14, 1992
  21.      Now use new /V parm to set environment variables.
  22. :endcomment
  23.  
  24. if not (%1)==() goto nohelp
  25. echo ───────────────────────────────────────────────────────────────────────────────
  26. echo                   HOW TO USE HOLIDAYS.BAT
  27. echo ───────────────────────────────────────────────────────────────────────────────
  28. ECHO HOLIDAYS without any parameters displays events in current year.
  29. ECHO.
  30. ECHO HOLIDAYS [year]                 displays events in [year].
  31. ECHO EXAMPLE: HOLIDAYS 1999          displays events in year 1999.
  32. ECHO.
  33. ECHO.
  34. ECHO.
  35. ECHO To print the calendar, press SHIFT+PRINTSCREEN to print each screen.
  36. ECHO.
  37. pause
  38. cls
  39. :nohelp
  40.  
  41.  
  42. rem --------------------------------------------------------
  43. rem get current year
  44. rem --------------------------------------------------------
  45. Fdate /Ff /At /Occyy /Vyear
  46.  
  47.  
  48. REM if user specifies a year as parm1, use it
  49. if not (%1)==() set year=%1
  50.  
  51.  
  52. rem --------------------------------------------------------
  53. rem Determine if year is a leapyear
  54. rem AND check for validity of year parm (%1)
  55. rem --------------------------------------------------------
  56. Fdate /Ff /A01-01-%year% /Oly /VLY
  57. if (%LY%)==(ERROR) echo Parm #1 was not a valid year: %1
  58. if (%LY%)==(ERROR) goto endit
  59.  
  60.  
  61.  
  62. echo ───────────────────────────────────────────────────────────────────────────────
  63. if (%LY%)==(0) ECHO                   EVENTS IN %YEAR%
  64. if (%LY%)==(1) ECHO                   EVENTS IN %YEAR%         Note: %year% is a leap year
  65. echo ───────────────────────────────────────────────────────────────────────────────
  66. Fdate /Ff         /A01-01-%year% /P"New Year's Day........................"
  67. Fdate /Ff         /A01-06-%year% /P"Epiphany.............................."
  68.  
  69. Fdate /Fw /D2 /N3 /A01-01-%year% /P"Martin Luther King, Jr. Day..........."
  70. Fdate /Ff /A02-01-%year% /P"    Note that " /S" begins Black History Month"
  71. rem   note use of x'ff'     ^^^^ for formatting
  72. Fdate /Ff         /A02-14-%year% /P"Valentine's day......................."
  73. Fdate /Fw /D2 /N3 /A02-01-%year% /P"Presidents' Day......................."
  74. Fdate /Ff         /A03-17-%year% /P"St. Patricks's Day...................."
  75.  
  76. if (%LY%)==(1) Fdate /Ff /A02-29-%year% /P"Sadie Hawkins Day....................."
  77.  
  78. REM ========== begin: DATES TIED TO EASTER==============================
  79. set easter=
  80. if (%year%)==(1991) set easter=03-31-%year%
  81. if (%year%)==(1992) set easter=04-19-%year%
  82. if (%year%)==(1993) set easter=04-11-%year%
  83. if (%year%)==(1994) set easter=04-03-%year%
  84. if (%year%)==(1995) set easter=04-16-%year%
  85. if (%year%)==(1996) set easter=04-07-%year%
  86. if (%year%)==(1997) set easter=03-30-%year%
  87. if (%year%)==(1998) set easter=04-12-%year%
  88. if (%year%)==(1999) set easter=04-04-%year%
  89. if (%year%)==(2000) set easter=04-23-%year%
  90. if (%year%)==(2001) set easter=04-15-%year%
  91. if (%easter%)==() goto unknown
  92. echo.
  93. Fdate /Fsub /N40 /A%easter% /P"Mardi Gras (Shrove Tuesday)..........."
  94. Fdate /Fsub /N46 /A%easter% /P"Ash Wednesday (Lent begins)..........."
  95. Fdate /Fsub /N7  /A%easter% /P"Palm Sunday..........................."
  96. Fdate /Fsub /N2  /A%easter% /P"Good Friday..........................."
  97. Fdate /Ff        /A%easter% /P"Easter................................"
  98. :unknown
  99. REM ==========   end: DATES TIED TO EASTER==============================
  100.  
  101. echo ───────────────────────────────────────────────────────────────────────────────
  102. PAUSE
  103. CLS
  104.  
  105. Fdate /Fw /D4 /N4  /A04-01-%year% /P"Secretaries Day......................."
  106. Fdate /Ff          /A05-05-%year% /P"Cinco de Mayo (Mexico)................"
  107.  
  108. Fdate /Fw /D1 /N2  /A05-01-%year% /P"Mother's Day.........................."
  109. Fdate /Fw /D2 /N-1 /A05-24-%year% /P"Victoria Day (Canada)................."
  110. Fdate /FW /D2 /N-1 /A05-31-%year% /P"Memorial Day (observed)..............."
  111.  
  112. if not (%easter%)==() Fdate /Fadd /N39 /A%easter% /P"Ascension Day........................."
  113. if not (%easter%)==() Fdate /Fadd /N49 /A%easter% /P"Pentecost............................."
  114. if not (%easter%)==() echo.
  115. Fdate /Ff         /A06-14-%year% /P"Flag Day.............................."
  116. rem ----- anniversary of Bloom's Day, June 16, 1904 ------------------
  117. rem Here's a way to show an anniversary or event that you want to note.
  118. rem Thanks to L. Schliesser for the algorithm.
  119. rem ------------------------------------------------------------------
  120. Fdate /F#dif /A%year% /B1904 /Vann
  121. Fdate /Ff         /A06-16-%year% /P"Bloom's Day (%ann%th anniversary)........"
  122. SET ann=
  123. rem ---------------end bloom's day --------------------------------------
  124.  
  125. Fdate /Fw /D1 /N3 /A06-01-%year% /P"Father's Day.........................."
  126. Fdate /Ff         /A07-01-%year% /P"Canada Day (Canada)..................."
  127. Fdate /Ff         /A07-04-%year% /P"Independence Day (USA)................"
  128. Fdate /Ff         /A07-14-%year% /P"Bastille Day (France)................."
  129.  
  130. rem echo ───────────────────────────────────────────────────────────────────────────────
  131. rem PAUSE
  132. rem CLS
  133.  
  134. Fdate /Fw /D2 /N1 /A09-01-%year% /P"Labor Day............................."
  135.  
  136. rem ---- begin ------- note a particular day in a particular year
  137. rem This technique is useful for noting special events:
  138. rem 21st birthdays, 50th wedding anniversaries, etc.
  139. if (%year%)==(1992) Fdate /Ff /A10-12-%year% /P"500th ann. of Columbus's discovery...."
  140. rem ----  end -------- note a particular day in a particular year
  141.  
  142. Fdate /Fw /D2 /N2  /A10-01-%year% /P"Columbus Day (observed)..............."
  143. Fdate /Ff          /A11-11-%year% /P"Veteran's Day........................."
  144.  
  145. Fdate /Fw /D5 /N4  /A11-01-%year% /P"Thanksgiving Day......................"
  146.  
  147.  
  148. Fdate /Fw /D1 /N-4 /A12-24-%year% /P"First Sunday in Advent................"
  149. Fdate /Ff          /A12-25-%year% /P"Christmas............................."
  150. Fdate /fadd /N1    /A12-31-%year% /P"New Year's Day........................"
  151. echo ───────────────────────────────────────────────────────────────────────────────
  152. :endit
  153. set year=
  154. set easter=
  155. set LY=
  156.